<template>
  <div class="task-view-cfg">
    <pre><span class="code-eidtor" v-html="cfg"></span></pre>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  data () {
    return {
      cfg: {}
    }
  },
  mounted () {
    let jsonObj = JSON.parse(this.curTaskConfig)
    this.cfg = JSON.stringify(jsonObj, null, 2)
  },
  computed: {
    ...mapGetters([
      'curTaskConfig'
    ])
  }
}
</script>

<style lang="stylus" scoped>
.task-view-cfg
  padding 20px
  background #fff
  border-radius 5px
  pre
    white-space pre-wrap
    overflow hidden
</style>
